<?php

/**
 * This is the model metadata class for table "hot_image".
 */
class HotImageMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'hot_image';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('sort, status', 'numerical', 'integerOnly'=>true),
			array('name, cate', 'length', 'max'=>20),
			array('link, image, thumb, desc', 'length', 'max'=>255),
			array('open_type', 'length', 'max'=>10),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, name, link, image, thumb, sort, cate, open_type, status, desc', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'name' => 'Name',
			'link' => 'Link',
			'image' => 'Image',
			'thumb' => 'Thumb',
			'sort' => 'Sort',
			'cate' => 'Cate',
			'open_type' => 'Open Type',
			'status' => 'Status',
			'desc' => 'Desc',
		);
	}
}